package nc.ui.ph.pub;

import java.util.HashMap;

import nc.bs.framework.common.NCLocator;
import nc.bs.pub.billcodemanage.BillcodeGenerater;
import nc.itf.uap.IUAPQueryBS;
import nc.jdbc.framework.processor.MapProcessor;
import nc.vo.pub.BusinessException;
import nc.vo.pub.billcodemanage.BillCodeObjValueVO;

public class ToolKit {
	public static IUAPQueryBS qry = (IUAPQueryBS)NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
	public static String getBillNO(String billTypecode, String pk_corp,
			String customBillCode, BillCodeObjValueVO vo)
			throws BusinessException {
		return new BillcodeGenerater().getBillCode(billTypecode, pk_corp,
				customBillCode, vo);
	}
	
	public static HashMap GetVfreeItem(String pk_invbasdoc) throws BusinessException{
		HashMap hm = (HashMap) qry.executeQuery("select free1 vfree1,free2 vfree2,free3 vfree3,free4 vfree4,free5 vfree5 from bd_invbasdoc where pk_invbasdoc='" +pk_invbasdoc+"'", new MapProcessor());
		return hm;
	}
}
